Skip to content

Conversation

@HankYuLinksys
Copy link
Collaborator

@HankYuLinksys HankYuLinksys commented Jan 12, 2026

User description

Summary

Closes #551
Closes #552


PR Type

Enhancement


Description

  • Remove unused healthCheckProvider watch from dashboardHomeProvider

  • Replace dashboardHomeProvider with dashboardManagerProvider in page-level providers

  • Decouple cross-page provider dependencies for cleaner architecture

  • Update property names to match core-level provider interface


Diagram Walkthrough

flowchart LR
  A["dashboardManagerProvider<br/>core-level"] -->|"lanConnections<br/>wanConnection"| B["wifi_bundle_provider<br/>page-level"]
  A -->|"lanConnections<br/>wanConnection"| C["instant_verify_view<br/>page-level"]
  D["dashboardHomeProvider<br/>page-level"] -->|"removed"| E["healthCheckProvider<br/>unused watch"]
  A -->|"replaces"| F["dashboardHomeProvider<br/>old dependency"]
Loading

File Walkthrough

Relevant files
Refactoring
dashboard_home_provider.dart
Remove unused healthCheckProvider watch                                   

lib/page/dashboard/providers/dashboard_home_provider.dart

  • Removed unused import of healthCheckProvider
  • Removed redundant ref.watch(healthCheckProvider) call from build()
    method
  • Simplified provider to only watch necessary dependencies
+0/-3     
instant_verify_view.dart
Replace dashboardHomeProvider with dashboardManagerProvider

lib/page/instant_verify/views/instant_verify_view.dart

  • Removed imports of dashboard_home_provider and _dashboard.dart
  • Changed _portsCard() to watch dashboardManagerProvider instead of
    dashboardHomeProvider
  • Updated property access from lanPortConnections to lanConnections
  • Updated property access from wanPortConnection to wanConnection
+4/-6     
wifi_bundle_provider.dart
Replace dashboardHomeProvider with dashboardManagerProvider

lib/page/wifi_settings/providers/wifi_bundle_provider.dart

  • Removed import of dashboardHomeProvider
  • Removed homeState variable from build() method
  • Updated build() to use dashboardManagerState for lanConnections check
  • Updated performFetch() to use dashboardManagerState instead of
    homeState
  • Changed property access from lanPortConnections to lanConnections
+3/-5     

…552)

- Remove unused healthCheckProvider watch from dashboardHomeProvider
  The watch was redundant as polling chain already handles reactivity

- Replace dashboardHomeProvider dependency with dashboardManagerProvider
  in wifi_bundle_provider and instant_verify_view for lan/wan connection data
@qodo-code-review
Copy link

qodo-code-review bot commented Jan 12, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟡
🎫 #552
🟢 Remove direct dependency of `dashboard_home_provider` on `health_check_provider`.
`dashboard_home_provider.dart` no longer imports `health_check_provider`.
🔴 Create lib/providers/network_health_provider.dart as a shared layer for health-related
state.
🟡
🎫 #551
🟢 Remove direct dependency of `wifi_bundle_provider` on `dashboard_home_provider`.
`wifi_bundle_provider.dart` no longer imports `dashboard_home_provider`.
🔴 `wifi_bundle_provider.dart` no longer imports `instant_privacy_state`.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 12, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Optimize widget rebuilds

Use ref.watch with .select to only listen for changes to lanConnections and
wanConnection, preventing unnecessary widget rebuilds.

lib/page/instant_verify/views/instant_verify_view.dart [722]

-final state = ref.watch(dashboardManagerProvider);
+final lanConnections = ref.watch(dashboardManagerProvider.select((s) => s.lanConnections));
+final wanConnection  = ref.watch(dashboardManagerProvider.select((s) => s.wanConnection));
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: This is a good performance optimization that limits widget rebuilds to only when necessary data changes, improving UI responsiveness.

Medium
  • Update

Copy link
Collaborator

@AustinChangLinksys AustinChangLinksys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@AustinChangLinksys AustinChangLinksys merged commit f8539b6 into dev-2.0.0 Jan 15, 2026
2 checks passed
@AustinChangLinksys AustinChangLinksys deleted the hank/refactor-architecture branch January 15, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Architecture][P2] Decouple dashboard → health_check Dependency [Architecture][P1] Decouple wifi_bundle ↔ dashboard Dependency

3 participants